/*
 * Serum
 *
 * @license      GNU Lesser General Public Licence see LICENCE-LGPL file or http://www.gnu.org/licenses/lgpl.html
 */

Serum.Form.Module.Extra.MyAccount = Ext.extend(Serum.Form.Module.Edit, {

    /**
     * Returns form fields list
     *
     * @param   {Object}    results     Results with values
     * @return  {Object}    Fields list
     */
    fieldsList: function(results) {
         return {
            'myinfo': [{
				'name':         {},
				'firstname':    {},
				'email':        {},
                'login':        {},
                'password':     {},
                //'DbLanguage':   {},
                'DbLanguage':   { xtype: 'countrylanguagefield', language_id: results['default']['DbLanguage']['value'], country_id: results['default']['DbCountry']['value'] }
			}]
        };
    },

    /**
     * Returns the top toolbar
     *
     * @return  {Array}
     */
    getTopToolbar: function() {
        return null;
    },

    /**
     * Returns true if current element is being edited
     *
     * @return  {Boolean}
     */
    isEditForm: function() {
        return true;
    }

});